package com.gg.user.system.feignClient;

import com.gg.common.result.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author chenjunjia
 * @date 2022/4/13 14:01
 */
@FeignClient(value = "service-cmn",path = "/admin/cmn")
@Service
public interface DictFeignClient {

    /**
     * 根据dictCode查询子成员
     * @param dictCode dict类型
     * @return 统一返回结果集
     */
    @GetMapping("getChildByDictCode/{dictCode}")
    CommonResult getChildByDictCode(@PathVariable("dictCode") String dictCode);

    /**
     * 通过id获取孩子字段
     * @param id 字段id值
     * @return 统一返回结果
     */
    @GetMapping("getChildById/{id}")
    CommonResult getChildById(@PathVariable("id") Long id);
}
